//
//  CommonTool.m
//  TenMinDemo
//
//  Created by Shawn Li on 2021/3/14.
//  Copyright © 2021 CYXiang. All rights reserved.
//

#import "CommonTool.h"

@implementation CommonTool

+ (CGFloat)floatFormat:(CGFloat)value{
    NSString *valueS = [NSString stringWithFormat:@"%lf",value];
    return [[[NSDecimalNumber decimalNumberWithString:valueS] stringValue] doubleValue];
}

+ (CGFloat)float_2Format:(CGFloat)value{
    NSString *valueS = [NSString stringWithFormat:@"%.2lf",value];
    CGFloat res = [[[NSDecimalNumber decimalNumberWithString:valueS] stringValue] doubleValue];
    return res;
}

@end
